package com.aaa.stock.controller.api;


import com.aaa.entity.DictData;
import com.aaa.entity.Provider;
import com.aaa.stock.service.DictDataService;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.List;

@RestController
@RequestMapping("stock/api/user")
public class ApiDictController {

    @Autowired
    private DictDataService dictDataService;


    @GetMapping("findByType/{type}")
    public Result<List<DictData>> findByType(@PathVariable String type){
        return dictDataService.findByType(type);
    }



    @GetMapping("findById/{providerId}")
    public Result<List<Provider>> findById(@PathVariable String providerId){
        return dictDataService.findById(providerId);
    }

//
//    @GetMapping("findByMed/{type}")
//    public Result<List<DictData>> findByMed(@PathVariable String type){
//        return dictDataService.findByMed(type);
//    }

}
